package com.trkj.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.List;


/**
 * The persistent class for the CHARGEPROJECT_TABLE database table.
 * 
 */
@Entity
@Table(name="CHARGEPROJECT_TABLE")
@NamedQuery(name="ChargeprojectTable.findAll", query="SELECT c FROM ChargeprojectTable c")
public class ChargeprojectTable implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private long chargecode;

	private String chaegename;

	private BigDecimal price3;

	private String unit3;

	//bi-directional many-to-one association to ChargetypeTable
	@ManyToOne
	@JoinColumn(name="CHARGETYPEID")
	private ChargetypeTable chargetypeTable;

	//bi-directional many-to-one association to HospEmerRegistration
	@OneToMany(mappedBy="chargeprojectTable")
	private List<HospEmerRegistration> hospEmerRegistrations;

	//bi-directional many-to-one association to HospPatientRegistration
	@OneToMany(mappedBy="chargeprojectTable")
	private List<HospPatientRegistration> hospPatientRegistrations;

	//bi-directional many-to-one association to InMedicalProjectChargeDeta
	@OneToMany(mappedBy="chargeprojectTable")
	private List<InMedicalProjectChargeDeta> inMedicalProjectChargeDetas;

	/*//bi-directional many-to-one association to OutMedicalProjectChargeDet
	@OneToMany(mappedBy="chargeprojectTable")
	private List<OutMedicalProjectChargeDet> outMedicalProjectChargeDets;*/

	//bi-directional many-to-many association to Reference
	@ManyToMany(mappedBy="chargeprojectTables")
	private List<Reference> references;

	public ChargeprojectTable() {
	}

	public long getChargecode() {
		return this.chargecode;
	}

	public void setChargecode(long chargecode) {
		this.chargecode = chargecode;
	}

	public String getChaegename() {
		return this.chaegename;
	}

	public void setChaegename(String chaegename) {
		this.chaegename = chaegename;
	}

	public BigDecimal getPrice3() {
		return this.price3;
	}

	public void setPrice3(BigDecimal price3) {
		this.price3 = price3;
	}

	public String getUnit3() {
		return this.unit3;
	}

	public void setUnit3(String unit3) {
		this.unit3 = unit3;
	}

	public ChargetypeTable getChargetypeTable() {
		return this.chargetypeTable;
	}

	public void setChargetypeTable(ChargetypeTable chargetypeTable) {
		this.chargetypeTable = chargetypeTable;
	}

	public List<HospEmerRegistration> getHospEmerRegistrations() {
		return this.hospEmerRegistrations;
	}

	public void setHospEmerRegistrations(List<HospEmerRegistration> hospEmerRegistrations) {
		this.hospEmerRegistrations = hospEmerRegistrations;
	}

	public HospEmerRegistration addHospEmerRegistration(HospEmerRegistration hospEmerRegistration) {
		getHospEmerRegistrations().add(hospEmerRegistration);
		hospEmerRegistration.setChargeprojectTable(this);

		return hospEmerRegistration;
	}

	public HospEmerRegistration removeHospEmerRegistration(HospEmerRegistration hospEmerRegistration) {
		getHospEmerRegistrations().remove(hospEmerRegistration);
		hospEmerRegistration.setChargeprojectTable(null);

		return hospEmerRegistration;
	}

	public List<HospPatientRegistration> getHospPatientRegistrations() {
		return this.hospPatientRegistrations;
	}

	public void setHospPatientRegistrations(List<HospPatientRegistration> hospPatientRegistrations) {
		this.hospPatientRegistrations = hospPatientRegistrations;
	}

	public HospPatientRegistration addHospPatientRegistration(HospPatientRegistration hospPatientRegistration) {
		getHospPatientRegistrations().add(hospPatientRegistration);
		hospPatientRegistration.setChargeprojectTable(this);

		return hospPatientRegistration;
	}

	public HospPatientRegistration removeHospPatientRegistration(HospPatientRegistration hospPatientRegistration) {
		getHospPatientRegistrations().remove(hospPatientRegistration);
		hospPatientRegistration.setChargeprojectTable(null);

		return hospPatientRegistration;
	}

	public List<InMedicalProjectChargeDeta> getInMedicalProjectChargeDetas() {
		return this.inMedicalProjectChargeDetas;
	}

	public void setInMedicalProjectChargeDetas(List<InMedicalProjectChargeDeta> inMedicalProjectChargeDetas) {
		this.inMedicalProjectChargeDetas = inMedicalProjectChargeDetas;
	}

	public InMedicalProjectChargeDeta addInMedicalProjectChargeDeta(InMedicalProjectChargeDeta inMedicalProjectChargeDeta) {
		getInMedicalProjectChargeDetas().add(inMedicalProjectChargeDeta);
		inMedicalProjectChargeDeta.setChargeprojectTable(this);

		return inMedicalProjectChargeDeta;
	}

	public InMedicalProjectChargeDeta removeInMedicalProjectChargeDeta(InMedicalProjectChargeDeta inMedicalProjectChargeDeta) {
		getInMedicalProjectChargeDetas().remove(inMedicalProjectChargeDeta);
		inMedicalProjectChargeDeta.setChargeprojectTable(null);

		return inMedicalProjectChargeDeta;
	}

	/*public List<OutMedicalProjectChargeDet> getOutMedicalProjectChargeDets() {
		return this.outMedicalProjectChargeDets;
	}

	public void setOutMedicalProjectChargeDets(List<OutMedicalProjectChargeDet> outMedicalProjectChargeDets) {
		this.outMedicalProjectChargeDets = outMedicalProjectChargeDets;
	}

	public OutMedicalProjectChargeDet addOutMedicalProjectChargeDet(OutMedicalProjectChargeDet outMedicalProjectChargeDet) {
		getOutMedicalProjectChargeDets().add(outMedicalProjectChargeDet);
		outMedicalProjectChargeDet.setChargeprojectTable(this);

		return outMedicalProjectChargeDet;
	}

	public OutMedicalProjectChargeDet removeOutMedicalProjectChargeDet(OutMedicalProjectChargeDet outMedicalProjectChargeDet) {
		getOutMedicalProjectChargeDets().remove(outMedicalProjectChargeDet);
		outMedicalProjectChargeDet.setChargeprojectTable(null);

		return outMedicalProjectChargeDet;
	}
*/
	public List<Reference> getReferences() {
		return this.references;
	}

	public void setReferences(List<Reference> references) {
		this.references = references;
	}

}